
	<div class="body">
		<div class="container">
			<div class="col-xs-12 col-sm-4 col-md-3 col-lg-3 sidebar">
					<ul class="nav nav-sidebar">
			            <li><strong class="caret pull-right"></strong>权限演示页面</li>
			            <li><a href="{:url('home/test/test1')}">测试页面一</a></li>
			            <li><a href="{:url('home/test/test2')}">测试页面二</a></li>
			            <li><a href="{:url('home/test/test3')}">测试页面三</a></li>
			            <li><a href="{:url('home/test/test4')}">测试页面四</a></li>
			            <li><a href="{:url('home/test/test5')}">测试页面五</a></li>
			            <li><strong class="caret pull-right"></strong>系统设置</li>
			            <li><a href="{:url('home/users/showuser')}">用户管理</a></li>
			            <li><a href="{:url('home/rolers/showrole')}">角色管理</a></li>
			            <li><a href="{:url('home/action/showact')}">权限管理</a></li>
			        </ul>
			</div>
			<div class="col-xs-12 col-sm-8 col-md-9 col-lg-9 content">
					<div>
					<a class="pull-right" href="{:url('home/users/showuser')}">返回列表</a>
					    <h1>RBAC</h1>
					    <form action="{:url('home/users/upuser')} " method="post">
					    <table> 
					    {notempty name="userinfo"}
					     <tr>
					    <td>用户ID</td>
					    <td><span>{$userinfo.user_id}</span><input type="hidden" name="user_id" value="{$userinfo.user_id}"></td>
					    </tr>
					    <tr>
					    <td>用户名</td>
					    <td><input type="text" name="user_name" value="{$userinfo.user_name}"></td>
					    </tr>
					      <tr>
					    <td>邮箱</td>
					    <td><input type="text" name="user_email" value="{$userinfo.user_email}"></td>
					    </tr>
					    <tr>
					    <td>身份</td>
					    {if condition="$userinfo['user_type'] != '0'"}
					    <td>
								<select name="user_type">
								  <option value ="1" selected>用户</option>
								  <option value ="0">管理员</option>
								</select>
						</td>
						{else/}
							<td>管理员<input type="hidden" name="user_type" value="{$userinfo.user_type}"><span style="color:red;font-weight:900;">不可修改</span></td>
						{/if}
						</tr>
					    <!--  tr>
					    <td>密码</td>
					    <td><input type="password" name="user_password"></td>
					    </tr>
					    <tr>
					    <td>重新确认密码</td>
					    <td><input type="password" name="rpassword"></td>
					    </tr>-->
					     <tr>
					    <td>用户角色</td>
					    <td>{if condition="$roles!=''"}
					    			{foreach $roles as $roles_item}
					    			<label> <input type="checkbox" name="roles_id[]" value="{$roles_item['roles_id']}" 
					    			{if condition="in_array($roles_item['roles_id'],$rolesid)"}checked{/if}>{$roles_item['roles_name']}</label>
					    			{/foreach}
					    		{/if}
					    </td>
					    </tr>
					      <tr>
					    <td colspan="2"><input type="submit"  value="修改"><input type="button"  value="返回" onclick="javascript:history.back(-1)"></td>
					    </tr>
					    {/notempty}
					    </table>
					    </form>
					    <p>项目源码地址：<a href="https://git.oschina.net/honoryao/tp5-rbac" >honoryao/tp5-rbac</a></p>
					</div>

				<hr/>
		        <footer>
		            <p class="pull-left">@qq：2463523099</p>
		            <p class="pull-right">微信：15109269885</p>
		        </footer>
			</div>
		</div>
	</div>